import request from '../util/request'

//添加广告请求
export const advRequest = (myFormData) => {
  return request.post('/addAdv', myFormData)
}

//查询所有广告
export const advListRequest = (pageNo,everyNum) => {
  return request.get(`/advList/${pageNo}/${everyNum}`)
}

//删除广告
export const deleteRequest = (_id) => {
  return request.delete('/deleteAdv',{
    params:{
      _id
    }
  })
}

//查询广告
export const getUpDataRequest =(_id)=>{
  return request.get('/getUpData',{
    params:{
      _id
    }
  })
}

//更新查询广告
export const updateAdvRequest =(formData,_id)=>{
  return request.put('/UpDataAdv',formData,{
    params:{
      _id
    }
  })
}
